Release 10.1A: OpenEdge Development:
Programming Interfaces
Referencing tables and fields
Unique table and field names do not require fully qualified references within application procedures. In a single database OpenEdge application, references to non-unique field names require a table prefix to avoid ambiguous field references. Use the following syntax to reference a non-unique field in a procedure:
The
table–nameis the name of the database table that contains the fieldfield–name.The ability to connect to several databases from a single OpenEdge session introduces the possibility of non-unique table names and increases the possibility of non-unique field names. References to non-unique table names within multi-database OpenEdge applications require database prefixes to avoid ambiguous table references. Ambiguous table and field references cause compilation failures.
Use the following syntax to include a database prefix in a table or field reference:
The
database–nameis the logical name (or an alias for a logical name) that represents the database that contains the tabletable–name.For example, suppose you are connected to two databases db1 and db2, both of which contain a table called customer. The following procedure will not compile due to an ambiguous table reference:
The procedure below uses fully qualified table references to display customer names from both connected databases (db1 and db2):
Notice that the two references to the name field do not need to be qualified because they appear within a
Note: When Progress encounters a statement such asFOR EACHblock that already contain fully qualified table references.DISPLAY X.Y, it first attempts to processX.Yas adatabasename.table–name. If that fails, Progress then attempts to processX.Yastable–name.field–name.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |